package com.example.zhilierp.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Swagger/OpenAPI配置类
 * 配置API文档信息
 */
@Configuration
public class SwaggerConfig {
    
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("ZhiLiERP系统API文档")
                        .description("智慧ERP系统的所有接口文档，包括用户管理、权限管理、业务流程等模块")
                        .version("1.0.0")
                        .contact(new Contact()
                                .name("开发团队")
                                .email("support@zhilierp.com")
                                .url("http://www.zhilierp.com"))
                        .license(new License()
                                .name("MIT License")
                                .url("https://opensource.org/licenses/MIT")));
    }
}